Ext.define('AM.view.panel.Meniu' ,{
    extend: 'Ext.form.Panel',
    alias : 'widget.meniu',
    id: 'meniu',

    initComponent: function() {
    	this.tbar= [{
            text: '<b>Menu</b>',
            iconCls: 'bmenu',
            //iconCls: 'add16',
            menu: [{text: 'Tools',handler: this.Tools,icon:'images/info_16.gif'},'-',
                   {text: 'Info',icon:'images/info_16.gif'},'-',
                   {text: 'Chenge',handler: this.Change,icon:'images/info_16.gif'},'-',
                   {text: 'Logout',handler: this.Logout,icon:'images/logout.png'}]
        },'-',{
            xtype: 'datefield',
            //anchor: '100%',
            //fieldLabel: 'To',
            //name: 'to_date',
            value: new Date(),
            id: 'app-nav-picker',
            //cls: 'ext-cal-nav-picker',
            listeners: {
                'select': {
                    fn: function(dp, dt){
                        Ext.getCmp('app-calendar').setStartDate(dt);
                    },
                    scope: this
                }
            }
        },'-',{ xtype: 'tbfill' },'-',
        {
            text: '<b>Logout</b>',
            iconCls: 'add16',
            icon:'images/logout.png', 
            handler: this.Logout
        }],
        this.callParent();
    	
    },
    
Logout: function(){
	Ext.getCmp('startpanel').show();
	Ext.getCmp('meniu').hide();
	Ext.getCmp('generalpanel').hide();
	Ext.getCmp('treepane').hide();
	Ext.getCmp('detailpanel').hide();
	Ext.getCmp('gr').hide();
	Ext.getCmp('login').show();
},

Change: function () {
  	var view = Ext.widget('change');
},
Tools: function () {
	var view = Ext.widget('tools');
},
});